# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gkraken
pkgver=0.14.4
pkgrel=0
pkgdesc="GUI that allows to control cooling of NZXT Kraken X pumps from Linux"
url="https://gitlab.com/leinardi/gkraken"
arch="noarch !mips !mips64"
license="GPL-3.0-or-later"
depends="python3 libdazzle libnotify py3-gobject3 py3-rx liquidctl py3-injector
	py3-matplotlib py3-peewee py3-xdg"
makedepends="meson gobject-introspection-dev gtk+3.0-dev"
options="!check" # no tests
source="https://gitlab.com/leinardi/gkraken/-/archive/$pkgver/gkraken-$pkgver.tar.gz
	60-gkraken.rules
	no-gettext-python-support.patch"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

package() {
	DESTDIR="$pkgdir" ninja -C output install

	mkdir -p "$pkgdir"/usr/lib/udev/rules.d
	install -m644 "$srcdir"/60-gkraken.rules "$pkgdir"/usr/lib/udev/rules.d/60-gkraken.rules
}

sha512sums="112b06f39291975738c2fee4b292c528a3eb96d2ddd52b5505efb1e0f602d351ba279ee6b137b1dc8aac87cf00226d4b50c1d3e363559212e82a9421784899cf  gkraken-0.14.4.tar.gz
25f658d75366300cf72d954024937b251c058fba8de531c3cfcbf0597f8ab1c7822f8e422146284d9f79c5f7e94cd5f476a5161389f828b112f8847cd73295a6  60-gkraken.rules
2b255e29e50fae08880f99940c2f4eeba59da7371f6874adf2607895909c1bd274cd149d56d0530041c67ceeafa4b028cf47c6b0605fc1dede00104bb0e6b4e5  no-gettext-python-support.patch"
